<template>
  <div>
    <h3 class="dialog-plate-title"><span>当日数据</span></h3>
    <el-form :inline="true" ref='stressM' :model="formDate" label-width="100px" class="demo-ruleForm">
      <el-form-item label="压力评分" prop="stressScore" ><el-input v-model="formDate.stressScore" class="width220" :disabled="type==='watch'"/></el-form-item>
      <el-form-item label="平均心率" prop="meanHeartRate" ><el-input v-model="formDate.meanHeartRate" class="width220" :disabled="type==='watch'"/></el-form-item>
      <el-form-item label="异常心率" prop="abnormalHeartRate" ><el-input v-model="formDate.abnormalHeartRate" class="width220" :disabled="type==='watch'"/></el-form-item>
      <el-form-item label="血管阶段" prop="bloodStage" ><el-input v-model="formDate.bloodStage" class="width220" :disabled="type==='watch'"/></el-form-item>
      <el-form-item label="检测护士"><el-input v-model="formDate.checkUserName" disabled class="width220" /></el-form-item>
      <el-form-item label="附件上传" prop="photo" class="form-item-block" >
        <div v-if="type==='watch'">
          <el-image style="width: 100px; height: 100px" class="mr-1" :src="item"  :preview-src-list="formDate.images" v-for="item in formDate.images" :key="item"> </el-image>
        </div>
     </el-form-item>
    </el-form>
    <div v-if="type==='watch'">
      <h3 class="dialog-plate-title"><span>历史数据</span></h3>
      <el-table ref="multipleTable" :data="tableData" stripe border>
        <el-table-column prop="stressScore" label="压力评分" min-width="120" />
        <el-table-column prop="meanHeartRate" label="平均心率" min-width="120" />
        <el-table-column prop="abnormalHeartRate" label="异常心率" min-width="120" />
        <el-table-column prop="bloodStage" label="血管阶段" min-width="120" />
        <el-table-column prop="checkUserName" label="检测护士" min-width="120" />
      </el-table>
    </div>
    
  </div>
</template>
<script>
import {queryBloodvesselList, queryBloodvessel} from "plugins/axios/inquiryRecord.js"
export default {
    props:{
      bodyRecodeId:{
        type:[String,Number]
      },
      providerId:{
        type:[String,Number]
      },
      type:{
        type:String
      }
    },
    data(){
        return{
          formDate:{},
          tableData:[]
        }
    },
    created(){   
      
    },
    watch:{},
    computed:{},
    methods:{
      // 查看初始化数据
      init(){
        this.getList();
        this.getTody();
      },
      getTody(){
        let self = this;
        queryBloodvessel(self.bodyRecodeId).then(res=>{
         self.formDate={...res.content}
        })
      },
      getList(){
        let self = this;
        queryBloodvesselList(self.providerId).then(res=>{
          self.tableData=res.content;
        })
      }
    }
}
</script>
<style scoped>
</style>